import cv2
import time
from baseImage import Image,Rect
#pip install image_registration
from image_registration.fft_tools import shift

match = shift()
img_source = Image(R"D:\data\CUGW\test1\IMG_5277.JPG")
img_search = Image(r'D:\data\nums\1.PNG')#.crop(Rect(1498,68,50,56))
start = time.time()
result = match.find_all_results(img_source,img_search)
print(time.time()-start)
print(result)
img = img_source.clone()
for _ in result:
    img.rectange(rect=_['rect'],color=(0,0,255),thinkness=3)
img.imshow('ret')
cv2.waitKey(0)